package com.alog.yzd.bookmall.domain.order;

import com.alog.yzd.bookmall.domain.user.User;

import java.util.List;

public class Order {
    private String oid;
    private String ordertime;
    private double total;
    private String address;
    private int status; //1,未付款; 2, 已经付款但未发货; 3,已发货但未确认收货; 4,确认收货交易成功; 5,已取消
    private User owner;

    private List<OrderItem> orderItems;

    public List<OrderItem> getOrderItems() {
        return orderItems;
    }

    public void setOrderItems(List<OrderItem> orderItems) {
        this.orderItems = orderItems;
    }

    public String getOid() {
        return oid;
    }

    public void setOid(String oid) {
        this.oid = oid;
    }

    public String getOrdertime() {
        return ordertime;
    }

    public void setOrdertime(String ordertime) {
        this.ordertime = ordertime;
    }

    public double getTotal() {
        return total;
    }

    public void setTotal(double total) {
        this.total = total;
    }

    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }

    public int getStatus() {
        return status;
    }

    public void setStatus(int status) {
        this.status = status;
    }

    public User getOwner() {
        return owner;
    }

    public void setOwner(User owner) {
        this.owner = owner;
    }

    @Override
    public String toString() {
        return "Order{" +
                "oid='" + oid + '\'' +
                ", ordertime='" + ordertime + '\'' +
                ", total=" + total +
                ", address='" + address + '\'' +
                ", status=" + status +
                ", owner=" + owner +
                '}';
    }
}
